package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.mapper.entity.StudentTask;
import com.example.demo.mapper.entity.StudentTaskView;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface StudentTaskManageMapper extends BaseMapper<StudentTask> {
    @Select("SELECT * FROM student_task_view WHERE task_type=1")
    List<StudentTaskView> getStudentPicTaskList();
    @Select("SELECT * FROM student_task_view WHERE task_type=2")
    List<StudentTaskView> getStudentQRTaskList();
    @Select("SELECT * FROM student_task_view WHERE task_type=3")
    List<StudentTaskView> getStudentCameraTaskList();
    @Select("SELECT * FROM student_task_view WHERE task_type=4")
    List<StudentTaskView> getStudentQuizTaskList();
    @Select("SELECT * FROM student_task_view WHERE id = #{id}")
    List<StudentTaskView> getEdutaskDetails(int id);
}
